package com.heima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmMaterialDto;
import com.heima.model.wemedia.pojos.WmMaterial;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

/**
* @author chenshan
*/
public interface MaterialService extends IService<WmMaterial> {
    /**
     * 自媒体端文件上传
     * @param multipartFile 文件
     * @return ResponseResult
     */
    ResponseResult uploadPicture(MultipartFile multipartFile) throws IOException, InvalidResponseException, InvalidKeyException, NoSuchAlgorithmException, ServerException, ErrorResponseException, XmlParserException, InvalidBucketNameException, InsufficientDataException, InternalException;


    /**
     * 当前登录用户的素材的分页查询
     * @param materialDto 是否收藏和分页条件
     * @return ResponseResult 分页结果
     */
    PageResponseResult materialList(WmMaterialDto materialDto);
}
